# the minimum version of CMake.
cmake_minimum_required(VERSION 3.10.2)

project("soundtouch")

set(CMAKE_C_FLAGS "-std=c99 -Wno-typedef-redefinition")

add_library(soundtouch
            SHARED
            soundtouch-jni.cpp
            SoundTouch/AAFilter.cpp
            SoundTouch/FIFOSampleBuffer.cpp
            SoundTouch/FIRFilter.cpp
            SoundTouch/cpu_detect_x86.cpp
            SoundTouch/sse_optimized.cpp
            SoundStretch/WavFile.cpp
            SoundTouch/RateTransposer.cpp
            SoundTouch/SoundTouch.cpp
            SoundTouch/InterpolateCubic.cpp
            SoundTouch/InterpolateLinear.cpp
            SoundTouch/InterpolateShannon.cpp
            SoundTouch/TDStretch.cpp
            SoundTouch/BPMDetect.cpp
            SoundTouch/PeakFinder.cpp)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/SoundTouch)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/SoundStretch)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)


target_link_libraries(soundtouch)

